//**********************************************************************************
//  PP3_8.java         Author:Tang Caiming
//
//  Write a program to generate the random number of the [20,40] range and 
//  show the sine, cosine, and tangent values of these random Numbers.
//**********************************************************************************

import java.util.*;

public class PP3_8
{
   public static void main(String[] args)
   {
      Random num = new Random();
      Scanner scan = new Scanner(System.in);

      int r;
      double s,c,t;

      r = num.nextInt(21) + 20;
      System.out.println("r=" + r);

      s = Math.sin(r);
      c = Math.cos(r);
      t = Math.tan(r);

      System.out.println("sin=" + s + ";" + "\ncos=" + c + ";" + "\ntan=" + t + ".");
   }
}
